home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1993 April
/
CICA MS Windows - April 1993.iso
/
unzipped
/
demo
/
lotorg
/
demobild.bat
next >
Wrap
DOS Batch File
|
1992-08-28
|
11KB
|
339 lines
ECHO OFF
CLS
IF %1.== . GOTO :NODRV
ECHO.
ECHO DEMOBILD will UNZIP the demo's files onto diskettes. You will then install
ECHO the demo on your system from the diskettes just as if you had received it from
ECHO the vendor.
ECHO.
ECHO.
PAUSE
IF NOT EXIST %1.ZIP GOTO :NODRV
IF %2.==a:. GOTO :AENV
IF %2.==A:. GOTO :AENV
IF %2.==b:. GOTO :BENV
IF %2.==B:. GOTO :BENV
GOTO :NODRV
:AENV
SET DR=A
GOTO :BEGIN
:BENV
SET DR=B
GOTO :BEGIN
:BEGIN
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
IF NOT EXIST DISK2.ZIP GOTO :NO_OLD_STUFF
ECHO Please be sure that the number of disks required in Step One above matches
ECHO the number of DISKx.ZIP files found on your system (shown below).
ECHO
DIR | FIND "DISK" > DEMOBILD.$$$
TYPE DEMOBILD.$$$ | FIND "ZIP"
DEL DEMOBILD.$$$
ECHO
ECHO If these don't match, there are probably DISKx.ZIP files left over from a
ECHO previous demo. If they don't match, press Ctrl-C now and remove those files.
ECHO If they do match, you may continue...
ECHO
PAUSE
:NO_OLD_STUFF
REM =================================================================== DISK 1
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are about to create a disk which contains the %1 demo. After you've
ECHO done this you'll be able to run the demo from the disk or install it on your
ECHO hard disk and run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a formatted, blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK1_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK1_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK1 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 2
IF NOT EXIST DISK2.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating a second %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a second blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK2_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK2_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK2 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 3
IF NOT EXIST DISK3.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the third %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a third blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK3_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK3_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK3 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 4
IF NOT EXIST DISK4.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the fourth %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a fourth blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK4_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK4_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK4 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 5
IF NOT EXIST DISK5.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the fifth %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a fifth blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK5_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK5_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK5 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 6
IF NOT EXIST DISK6.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the sixth %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a sixth blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK6_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK6_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK6 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 7
IF NOT EXIST DISK7.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the seventh %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a seventh blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK7_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK7_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK7 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 8
IF NOT EXIST DISK8.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the eighth %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a eighth blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK8_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK8_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK8 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
REM =================================================================== DISK 9
IF NOT EXIST DISK9.ZIP GOTO :STEP_2
CLS
ECHO -----------------------------------------------------------------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO You are now creating the ninth %1 demo disk. When you're finished you'll
ECHO be able to run the demo from the disk or install it on your hard disk and
ECHO run it from there.
ECHO.
ECHO The minimum diskette capacity required is shown above. You may use a larger
ECHO capacity diskette if desired.
ECHO.
ECHO.
ECHO Put a ninth blank diskette in drive %2 -- (Ctrl-C to quit.)
:DISK9_PAUSE
ECHO.
PAUSE
IF EXIST %2*.* ECHO The diskette in drive %2 must be completely blank (Ctrl-C to quit)
IF EXIST %2*.* GOTO :DISK9_PAUSE
PKUNZIP -d -$%DR% -JRHS DISK9 %2\
IF ERRORLEVEL 1 GOTO :ZIP_ERROR
ECHO.
ECHO.
PAUSE
:STEP_2
CLS
ECHO ------------------------ Step One has been completed -----------------------
TYPE %1.INF
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO.
ECHO === To complete the installation follow the directions for Step Two above ===
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
ECHO.
GOTO :END
REM ==== Error messages and exit below ======================================
:ZIP_ERROR
ECHO
ECHO
ECHO ***** Error reading zip file *****
ECHO
ECHO
GOTO :END
:NODRV
ECHO.
ECHO.
ECHO You need to specify the name of the demo and specify which diskette drive
ECHO you want to use when creating the demo diskettes.
ECHO.
ECHO SYNTAX: DEMOBILD demo-name drive: (the colon is required)
ECHO.
ECHO.
IF %1. ==. GOTO :END
IF %2.==a. ECHO ** The colon, remember the colon!
IF %2.==A. ECHO ** The colon, remember the colon!
IF %2.==b. ECHO ** The colon, remember the colon!
IF %2.==B. ECHO ** The colon, remember the colon!
IF NOT EXIST %1.ZIP ECHO ** Can't find the demo file: %1.ZIP
ECHO.
ECHO.
ECHO.
REM ---- The following echo sounds a beep
ECHO
GOTO :END
:END